package com.dslcode.cloud.provider.order.service;

import com.dslcode.cloud.common.model.order.OrderCommon;
import com.dslcode.cloud.provider.order.mapper.OrderCommonMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by dongsilin on 2017/9/26.
 */
@Slf4j
@Service
public class OrderCommonService {

    @Autowired
    private OrderCommonMapper orderCommonMapper;

    @Transactional
    public OrderCommon save(Long orderId, String receiveName, String reciverInfo) {
        OrderCommon orderCommon = new OrderCommon(orderId, receiveName, reciverInfo);
        orderCommonMapper.save(orderCommon);
        return orderCommon;
    }

}
